<template>
    <div class="index">
        <router-link to="/bookmarkClass">书签分类</router-link>
    </div>
</template>

<script>
import { onBeforeMount,getCurrentInstance } from "vue"; 
import { useRouter } from 'vue-router';
export default {
    name:'Index',
    setup() {
        const router = useRouter();
        const cookies = getCurrentInstance().appContext.config.globalProperties.$cookies;
        onBeforeMount(() => {
            if(cookies.get('isLogin')=='false'){
                router.push({name:'Login'})
            }
        })
    }
}
</script>

<style lang="scss" scoped>
.index{
    text-align: center;
    a{
        font-size: 30px;
    }
}

</style>